excluded_unless bug fix#1307
Conversation
6c54727 to
ca3636f
Compare
|
any update for this issue? |
Looks like we have a conflict. I can update the PR but had no momentum on it when I first posted. |
|
Please resolve the conflicts, and I’ll proceed with the approval |
65df2bb to
0066799
Compare
|
@nodivbyzero thank you. We should be ready. |
validator_test.go
Outdated
| {"ABCDDE1-", "bic", false}, // hyphen in location | ||
| {"ABCDDE1_", "bic", false}, // underscore in location | ||
| {"ABCDDE١٢", "bic", false}, // non-ASCII digits in location | ||
| {"DEUTDEFF", "bic", true}, // 8-char classic (Germany) |
There was a problem hiding this comment.
is this change related to the excluded_unless?
There was a problem hiding this comment.
sorry, moving back to command line, IDEA driving me nuts with go fmt
There was a problem hiding this comment.
formatting and history cleaned up
e9fd119 to
1798595
Compare
…site equivilant result to required_unless
1798595 to
2cb9f1d
Compare
|
@chargraves85 @nodivbyzero Hi there, I’m a bit confused about this bug fix and was hoping you could help clarify. Per the official documentation:
Put simply: all of the fields specified after However, this bug fix appears to have changed this behavior to require only any of the specified fields to match their values (i.e., a logical OR operation) instead. |
Fixes Or Enhances
The verbiage in the documentation for both
excluded_unlessandrequired_unlessis very similar. One would expect the opposite behavior for each when using multiple values of the same field that is being validated against.For example:
This fails in all 3 cases in sample code
However, the equivilant opposite of this only fails in TestC
resolves #1306